{extend name="public/base"/}
{block name="body"}
<script language="javascript">
window.onload=function() {
  document.forms[0].reset();
  placeFocus();
}
function placeFocus() {
  document.forms[0].elements[0].focus();
  // assuming the first element
}
</script>

<style>

.mui-table-view-cell p {

    margin-bottom: 0;

    font-size: 12px;

}

.mui-table-view .mui-media-object {

    line-height: 42px;

    width: 60px !important;

        max-width: 60px;

    height: 60px;

}

.mui-card-header {

    font-size: 12px;

    border-radius: 2px 2px 0 0;

        padding: 5px 10px;

}

</style>


<header class="mui-bar mui-bar-nav">
  <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>

    <h1 class="mui-title">我的订单</h1>
   
</header>

<div class="mui-content" style="    margin-bottom: 100px;">
	{if condition="$dlproxy gt 0"}
	
	
		<div>
			<form method="get">
				<div>
				备注|地址|名字：<input type="text" class="form-control" name="remark" value="{$Think.get.remark}" placeholder="请输入地址/备注/名字">
				
			<!--
				寮�濮嬫椂闂达細<input type="date" class="form-control" name="start" value="{$Think.get.start}" placeholder="瀵拷婵妞傞梻锟�">
										
							缁撴潫鏃堕棿锛�<input type="date" class="form-control" name="end" value="{$Think.get.end}" placeholder="缂佹挻娼弮鍫曟？">
											
									-->
					
				
               
					 <button class="btn btn-primary" type="submit">搜索</button>
				</div>
			
			</form>
		</div>

<div>
	<div>
	<span>商品总价格({$shopsSum})</span>
           <span>代理价额({$dlpritotalSum})</span>
           
            <span>代理提成({$shopsSum-$dlpritotalSum})</span>
          
      </div>
     
      <div>
	<span>已结代理费用({$dlalreadypay})</span>
           <span>未结代理费用({$shopsSum-$dlpritotalSum-$dlalreadypay})</span>
           
          
     
      </div>

	
       {/if}
  {volist name="list" id="vo"}
    <div class="mui-card">
    	
    	
      
      	<div class="mui-card-header ">

          <!--<div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['out_trade_no']}</div>-->
          <div class="mui-ellipsis mui-col-xs-8">订单编号：{$vo['id']}</div>
      
          <div class="mui-col-xs-4 mui-text-right"><button  type="button" class="mui-btn qxdd mui-btn-primary mui-btn-outlined" style="font-size:12px;">{$vo['buystatus']|parse_config_value='pay_status'}</button></div>

        </div>
        
         
      	<div class="mui-card-content">
      		<div class="mui-card-content-inner" style="    padding: 5px 0;">

            <ul class="mui-table-view mui-table-view-chevron">
                <li class="mui-table-view-cell mui-media" onclick='window.location.href = "{:url('index/order/detail',array('id'=>$vo['id']))}"'>
                    <a class="mui-navigate-right">
                        <img class="mui-media-object mui-pull-left" src="{$vo['cover_id']|get_cover='path'}">
                        <div class="mui-media-body">
                            
                            <p>订单编号:{$vo['id']}</p>
                            <p><span style='color:red'>¥{$vo['total']}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            	{if condition="$dlproxy gt 0"}
          	<span style='color:red'> 代理 ：¥{$vo['dlshop_price']}</span>
          	
          	{/if}
          	</div>
                            	
                            </p>
                            
                            <p >下单时间：{$vo['create_time']}</p>
                            <!--<p>收货时间：{$vo['deliverytime']}</p>-->
                             <p>收货人：{$vo.user_name}   <br /> 
                            	收货地址：{$vo.address}   <br />
                            	下单微信：{$vo.nick_name}

                            </p>

                            <p>备注：{$vo.remark} </p>
                        </div>
                    </a>
                </li>

            </ul>
            

        	</div>
      </div>
    </div>
  {/volist}
    {include file="public/nav" /}
</div>







{/block}
{block name="script"}
<script>


		
		
  mui.init({
    swipeBack:true //启用右滑关闭功能
  });
  $('#scroll').height($(window).height()-44)


  $(function(){
    $('.delorder').on('click', function(){
      var $this = $(this),id = $this.attr('data-id')
      var btnArray = ['否', '是'];
      mui.confirm('您确定要删除该订单吗？', '删除订单', btnArray, function(e) {
        if (e.index == 1) {
            $.post("{:url('index/order/delorder')}", {
                "id": id
            }, function(data) {
                mui.toast('删除成功！')
                setTimeout(function() {
                  location.reload()
                }, 2000);
            }, "json");

        } else {
          return ;
        }
      })


    })
  })


</script>


<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" charset="utf-8"></script>

<script>

    wx.config({$wxoptions|json_encode});

    wx.error(function(e){

      	console.log(e);

      });

    wx.ready(function(){

      wx.onMenuShareTimeline({

          title: "{$title}",
          desc: "{$title},订单详细情况查询", // 分享描述

          link: "",

          imgUrl: "http://www.xgw0851.com/public/images/getheadimg.png",

      });

      wx.onMenuShareAppMessage({

          title: "{$title}",

          desc: "{$title},订单详细情况查询", // 分享描述

          link: "",

          imgUrl: "http://www.xgw0851.com/public/images/getheadimg.png",



      });

    });

</script>


{/block}
